/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package testGUI;

import GUI.MainFrame;
import GUI.NewVisit;
import functions.HealingSet;
import functions.Users;
import javax.swing.UIManager;
import junit.framework.TestCase;
import model.Database;
import model.Dog;
import model.User;

/**
 *
 * @author JArik
 */
public class testNewVisit extends TestCase {


    public void testVisit() throws Exception
    {
        UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        Database.connect("dogy", "root", "");
        User usr = Users.getAll().get(6007);
        Dog dg = usr.getDogs().get(0);
        HealingSet hs = null;
        if(dg != null && dg.getHealing() != null && dg.getHealing().size() > 0)
          hs = dg.getHealing().get(0);
        NewVisit visit = new NewVisit(new MainFrame(null),usr,dg,hs,null);
        visit.setVisible(true);
        while(visit.isVisible()) { Thread.sleep(100);}

    }

}
